package com.tx.springboot_mp.controller;/*
 *
 * @author 陈粒
 * @version 创建时间：2021/8/25 9:17
 */

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tx.springboot_mp.mapper.UserMapper;
import com.tx.springboot_mp.pojo.User;
import com.tx.springboot_mp.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("id")
    public User findAll(Integer id) {
        return userService.findUserById(id);
    }
    @GetMapping("namesex")
    public List<User> findNS(User user) {
        return  userService.findUserByNS(user);
    }
}
